package com.gexiaobao.pigeon.viewmodel

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.gexiaobao.pigeon.app.model.bean.Auction
import com.gexiaobao.pigeon.app.model.bean.OrgInfoDetailResponse
import com.gexiaobao.pigeon.app.model.bean.PassInfoBean
import com.gexiaobao.pigeon.app.model.bean.RaceInfoResponse
import com.gexiaobao.pigeon.app.model.bean.TodayEnd
import com.gexiaobao.pigeon.app.model.bean.TomorrowEnd
import com.gexiaobao.pigeon.app.model.bean.VisitMemberListResponse

/**
 * @Author      : hxw
 * @Date        : 2024/8/2 10:27
 * @Describe    :
 */
class SharedViewModel : ViewModel() {

    private val _data = MutableLiveData<PassInfoBean>()
    private val _dataAuctions = MutableLiveData<ArrayList<Auction>>()
    private val _dataToday = MutableLiveData<ArrayList<TodayEnd>>()
    private val _dataTomorrow = MutableLiveData<ArrayList<TomorrowEnd>>()
    private val _orgInfoBean = MutableLiveData<OrgInfoDetailResponse>()
    private val _raceInfoData = MutableLiveData<RaceInfoResponse>()
    private val _memberInfoListData = MutableLiveData<ArrayList<VisitMemberListResponse.ListBean>>()

    val data: LiveData<PassInfoBean> get() = _data
    val dataAuctions: LiveData<ArrayList<Auction>> get() = _dataAuctions
    val dataToday: LiveData<ArrayList<TodayEnd>> get() = _dataToday
    val dataTomorrow: LiveData<ArrayList<TomorrowEnd>> get() = _dataTomorrow
    val orgInfoBean: LiveData<OrgInfoDetailResponse> get() = _orgInfoBean
    val raceInfoData: LiveData<RaceInfoResponse> get() = _raceInfoData
    val memberInfoListData: LiveData<ArrayList<VisitMemberListResponse.ListBean>> get() = _memberInfoListData

    fun setData(data: PassInfoBean) {
        _data.value = data
    }

    fun setAuctionsData(data: ArrayList<Auction>) {
        _dataAuctions.value = data
    }

    fun setTodayData(data: ArrayList<TodayEnd>) {
        _dataToday.value = data
    }

    fun setTomorrowData(data: ArrayList<TomorrowEnd>) {
        _dataTomorrow.value = data
    }

    fun setOrgInfoBean(data: OrgInfoDetailResponse) {
        _orgInfoBean.value = data
    }

    fun setRaceInfoData(data: RaceInfoResponse) {
        _raceInfoData.value = data
    }

    fun setMemberInfoListData(data: ArrayList<VisitMemberListResponse.ListBean>) {
        _memberInfoListData.value = data
    }
}